package com.galaxis.wms.query

import com.galaxis.wms.entity.BasMaterialTemplateAttrs
import com.querydsl.core.types.Path
import com.querydsl.core.types.PathMetadata
import com.querydsl.core.types.dsl.NumberPath
import com.querydsl.core.types.dsl.StringPath
import com.querydsl.sql.ColumnMetadata
import com.querydsl.sql.RelationalPathBase

import java.sql.Types

import static com.querydsl.core.types.PathMetadataFactory.forVariable

/**
 * 项目配置字段信息(bas_material_template_attrs)
 */
@SuppressWarnings("ALL")
class QBasMaterialTemplateAttrs extends RelationalPathBase<BasMaterialTemplateAttrs> {
    /** bas_material_template_attrs表 */
    public static final QBasMaterialTemplateAttrs basMaterialTemplateAttrs = new QBasMaterialTemplateAttrs("bas_material_template_attrs")

    /** 主键 */
    public final NumberPath<Long> attrId = createNumber("attrId", Long.class)
    /** 物流项目ID */
    public final NumberPath<Long> projectId = createNumber("projectId", Long.class)
    /** 字段类型(01 表头扩展字段、02 明细库存属性字段、03 明细扩展字段) */
    public final StringPath attrType = createString("attrType")
    /** 字段编码(lohRemark1-20、lolStockStr1-20、lolRemark1-20) */
    public final StringPath attrCode = createString("attrCode")
    /** 字段名称 */
    public final StringPath attrName = createString("attrName")
    /** 字段属性(input: 文本输入框、number: 数字输入框、select: 下拉框、dateTime:日期时间、mainData：基础数据) */
    public final StringPath componentCode = createString("componentCode")
    /** 数据库字段类型(varchar:字符串、datetime:日期时间类型、double:浮点型、decimal:定点数) */
    public final StringPath dbColumnType = createString("dbColumnType")
    /** 数据库字段长度(字符串：32、浮点型: 15,6、日期时间类型:3) */
    public final StringPath dbColumnLength = createString("dbColumnLength")
    /** 是否必填(0:否、1:是) */
    public final StringPath required = createString("required")
    /** 是否可编辑(0:否、1:是) */
    public final StringPath edit = createString("edit")
    /** 是否可见(0:隐藏, 1:可见) */
    public final StringPath showable = createString("showable")
    /** 排序 */
    public final NumberPath<Integer> sort = createNumber("sort", Integer.class)
    /** 字典项编码 */
    public final StringPath bizCodeCategory = createString("bizCodeCategory")
    /** 主数据模块(material_data: 物料、material_dir:物资目录、supplier_standard:供应商、partya_project:甲方项目) */
    public final StringPath mainDataModule = createString("mainDataModule")
    /** 备用字段 */
    public final StringPath remark1 = createString("remark1")
    /** 备用字段 */
    public final StringPath remark2 = createString("remark2")
    /** 备用字段 */
    public final StringPath remark3 = createString("remark3")
    /** 备用字段 */
    public final StringPath remark4 = createString("remark4")
    /** 备用字段 */
    public final StringPath remark5 = createString("remark5")
    /** 备用字段 */
    public final StringPath remark6 = createString("remark6")
    /** 备用字段 */
    public final StringPath remark7 = createString("remark7")
    /** 备用字段 */
    public final StringPath remark8 = createString("remark8")
    /** 备用字段 */
    public final StringPath remark9 = createString("remark9")
    /** 备用字段 */
    public final StringPath remark10 = createString("remark10")

    QBasMaterialTemplateAttrs(String variable) {
        super(BasMaterialTemplateAttrs.class, forVariable(variable), "public", "bas_material_template_attrs")
        addMetadata()
    }

    QBasMaterialTemplateAttrs(String variable, String schema, String table) {
        super(BasMaterialTemplateAttrs.class, forVariable(variable), schema, table)
        addMetadata()
    }

    QBasMaterialTemplateAttrs(String variable, String schema) {
        super(BasMaterialTemplateAttrs.class, forVariable(variable), schema, "bas_material_template_attrs")
        addMetadata()
    }

    QBasMaterialTemplateAttrs(Path<? extends BasMaterialTemplateAttrs> path) {
        super(path.getType(), path.getMetadata(), "public", "bas_material_template_attrs")
        addMetadata()
    }

    QBasMaterialTemplateAttrs(PathMetadata metadata) {
        super(BasMaterialTemplateAttrs.class, metadata, "public", "bas_material_template_attrs")
        addMetadata()
    }

    void addMetadata() {
        addMetadata(attrId, ColumnMetadata.named("attr_id").withIndex(1).ofType(Types.BIGINT).withSize(64))
        addMetadata(projectId, ColumnMetadata.named("project_id").withIndex(2).ofType(Types.BIGINT).withSize(64))
        addMetadata(attrType, ColumnMetadata.named("attr_type").withIndex(3).ofType(Types.VARCHAR).withSize(255))
        addMetadata(attrCode, ColumnMetadata.named("attr_code").withIndex(4).ofType(Types.VARCHAR).withSize(255))
        addMetadata(attrName, ColumnMetadata.named("attr_name").withIndex(5).ofType(Types.VARCHAR).withSize(255))
        addMetadata(componentCode, ColumnMetadata.named("component_code").withIndex(6).ofType(Types.VARCHAR).withSize(255))
        addMetadata(dbColumnType, ColumnMetadata.named("db_column_type").withIndex(7).ofType(Types.VARCHAR).withSize(255))
        addMetadata(dbColumnLength, ColumnMetadata.named("db_column_length").withIndex(8).ofType(Types.VARCHAR).withSize(255))
        addMetadata(required, ColumnMetadata.named("required").withIndex(9).ofType(Types.VARCHAR).withSize(255))
        addMetadata(edit, ColumnMetadata.named("edit").withIndex(10).ofType(Types.VARCHAR).withSize(255))
        addMetadata(showable, ColumnMetadata.named("showable").withIndex(11).ofType(Types.VARCHAR).withSize(255))
        addMetadata(sort, ColumnMetadata.named("sort").withIndex(12).ofType(Types.INTEGER).withSize(32))
        addMetadata(bizCodeCategory, ColumnMetadata.named("biz_code_category").withIndex(13).ofType(Types.VARCHAR).withSize(255))
        addMetadata(mainDataModule, ColumnMetadata.named("main_data_module").withIndex(14).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark1, ColumnMetadata.named("remark1").withIndex(15).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark2, ColumnMetadata.named("remark2").withIndex(16).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark3, ColumnMetadata.named("remark3").withIndex(17).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark4, ColumnMetadata.named("remark4").withIndex(18).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark5, ColumnMetadata.named("remark5").withIndex(19).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark6, ColumnMetadata.named("remark6").withIndex(20).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark7, ColumnMetadata.named("remark7").withIndex(21).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark8, ColumnMetadata.named("remark8").withIndex(22).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark9, ColumnMetadata.named("remark9").withIndex(23).ofType(Types.VARCHAR).withSize(255))
        addMetadata(remark10, ColumnMetadata.named("remark10").withIndex(24).ofType(Types.VARCHAR).withSize(255))
    }
}
